<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: {2021/1/12}
 * Time: {15:43}
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\lib;


class Num
{
    /**
     * @param int $len
     * @return int
     */
    public static function randNum(int $len = 4): int
    {
        $string = rand(1000, 9999);
        if ($len == 6) {
            $string = rand(100000, 999999);
        }
        return $string;
    }
}